/*
 * animations.h
 *
 *  Created on: Feb 25, 2012
 *      Author: a0272955
 */

#ifndef ANIMATIONS_H_
#define ANIMATIONS_H_


#define CUBE_STRING_DELAY 8

#define SINE_3D_DELAY 15

#define WAVES_DELAY 10
#define WAVES_DEPTH  0xFF

#define CUBE2    7
#define CUBE4    7

#define OUTLINE 7

#define SHOW_BELT_DELAY 7


extern void animation1(unsigned long numLoops);
extern void animation2(unsigned long numLoops);
extern void randomness(unsigned long numLoops);

// Cubed Animations
extern void cubes_2(void);
extern void cubes_4(void);

// 2x2 Moves
extern int cube2_move_y_fwd( char cube2[4][4], int y, int x, int z );
extern int cube2_move_y_rev( char cube2[4][4], int y, int x, int z  );
extern int cube2_move_x_fwd( char cube2[4][4], int y, int x, int z  );
extern int cube2_move_x_rev( char cube2[4][4], int y, int x, int z  );
extern int cube2_move_z_fwd( char cube2[4][4], int y, int x, int z  );
extern int cube2_move_z_rev( char cube2[4][4], int y, int x, int z  );

// Misc Animations
extern void cube_explosion(void);
extern void cube_stars(void);
extern void cube_belt_wipe(void);
extern void cube_stripes(void);
extern void outline_shrink(void);
extern void cube_sonic(void);
extern void cube_2_auto_show( char cube2[4][4] );
extern void cube_2_auto( void );
extern void cube_outline( void );
extern void cube_waves( void );
extern void cube_block_wipe( void );

// Space Invaders
extern void cube_invaders( void );
static void invader_show_loop(int *layer, int *position, int *m_layer, int *m_pos );
static void def_fire( int *layer, int *position, int defender_position );
extern void invaders_move_down( int *layer, int position );
extern void invaders_move_left( int layer, int *position );
extern void invaders_move_right( int layer, int *position );

// String manipulation animations
extern void cube_string( char *string );
extern void cube_string_to_front( char *string );
extern void cube_fixed_string( void );
extern void cube_string_belt( char *string );
extern void move_belt_left( char *belt );
extern void set_char_to_belt( char character, char *belt );
extern void show_belt( char *belt );

// Man walking animation
extern void cube_walking( void );
extern void cube_walking_frame0( void );
extern void cube_walking_frame1( void );
extern void cube_walking_frame2( void );
extern void cube_walking_frame3( void );
extern void cube_walking_frame_static0( void );
extern void cube_walking_frame_static1( void );
extern void cube_walking_frame_static2( void );
extern void cube_walking_frame_static3( void );
extern void cube_walking_frame_door0( void );

// 3D SINE WAVE
extern void sine_3d( void );

#endif /* ANIMATIONS_H_ */
